class NineSlices extends egret.Sprite {
	private arr_white;
	public constructor(getText, bala) {
		super();
		var v = 20;
		var text: egret.TextField = new egret.TextField();
		text.text = getText;
		text.size = 18;
		text.fontFamily = "Arial";
		text.textColor = 0x000000;
		text.multiline = true;
		text.size = 30;


		if (bala == "Rose") {
			text.x = 11 + v;
			text.y = 6 + v;
			if (text.width > 330) {
				text.width = 330;
			}



			var getWidth = text.width;
			var getHeight = text.height;

			this.arr_white = new Array();


			for (var z = 1; z <= 10; z++) {
				var pic = new egret.Bitmap(RES.getRes("kata" + z + "_png"));
				this.arr_white.push(pic);
				switch (z) {
					case 1: pic.x = 11; pic.y = 0; break;
					case 2: pic.x = 11 + 8; pic.y = 0; pic.width = getWidth + v; break;
					case 3: pic.x = 11 + 8 + getWidth + v; pic.y = 0; break;
					case 4: pic.x = 11; pic.y = 6; pic.height = getHeight + v * 2; break;
					case 5: pic.x = 11 + 8; pic.y = 6; pic.width = getWidth + 10 + v; pic.height = getHeight + v * 2; break;
					case 6: pic.x = 11 + 8 + getWidth + v ; pic.y = 6; pic.height = getHeight + v * 2; break;
					case 7: pic.x = 11 + 2; pic.y = 6 + getHeight + v * 2; break;
					case 8: pic.x = 11 + 8; pic.y = 6 + getHeight + v *2; pic.width = getWidth + v ; break;
					case 9: pic.x = 11 + 8 + getWidth + v ; pic.y = 6 + getHeight + v * 2; break;
					case 10: pic.x = 3; pic.y = 16; break;

				}
				this.addChild(pic);
			}
		}
		else{
			text.x =+ v;
			text.y = 6 + v;
			if (text.width > 350) {
				text.width = 350;
			}



			var getWidth = text.width;
			var getHeight = text.height;

			this.arr_white = new Array();


			for (var z = 1; z <= 10; z++) {
				var pic = new egret.Bitmap(RES.getRes("gkata" + z + "_png"));
				this.arr_white.push(pic);
				switch (z) {
					case 1: pic.x = 0; pic.y = 0; break;
					case 2: pic.x = 0 + 8; pic.y = 0; pic.width = getWidth + v ; break;
					case 3: pic.x = 0 + 8 + getWidth + v ; pic.y = 0; break;
					case 4: pic.x = 0; pic.y = 6; pic.height = getHeight + v * 2; break;
					case 5: pic.x = 0 + 8; pic.y = 6; pic.width = getWidth + 10 + v ; pic.height = getHeight + v * 2; break;
					case 6: pic.x = 0 + 8 + getWidth + v ; pic.y = 6; pic.height = getHeight + v * 2; break;
					case 7: pic.x = 0 + 2; pic.y = 6 + getHeight + v * 2; break;
					case 8: pic.x = 0 + 8; pic.y = 6 + getHeight + v * 2; pic.width = getWidth + v ; break;
					case 9: pic.x = 0 + 8 + getWidth + v ; pic.y = 6-4 + getHeight + v * 2; break;
					case 10: pic.x =8+ getWidth+v+6; pic.y = 16; break;
				}
				this.addChild(pic);
			}
		}

		this.addChild(text);
	}
}